var { clickUtils, ocrUtils, gUtils } = require("../shizukuUtils/index");
var { logHelper, deviceHelper } = require("../helper/index");
var daishu_pointMap = require("../pointMap/daishu");
var { phoneNumberMap } = require("../const");
var phoneNumber = phoneNumberMap[deviceHelper.getAndroidId()];
var pointMap = daishu_pointMap[phoneNumber];
ocrUtils.init();
Wang.main = function (type) {
  if (type == 1) {
    var text$ = "领取";
    ocrUtils.updateCaptureImg();
    var TextOCR = ocrUtils.startWith(text$);
    logHelper.log("找到[领取]");
    while (TextOCR) {
      clickUtils.clickTextOCR(TextOCR);
      gUtils.sleep(3, 5);
      clickUtils.clickPointMap(pointMap.关闭);
      gUtils.sleep(3, 5);
      ocrUtils.updateCaptureImg();
      TextOCR = ocrUtils.startWith(text$);
    }
    logHelper.log("没找到[领取]，结束运行");
  } else {
    clickUtils.clickPointMap(pointMap.关闭);
    gUtils.sleep(2, 3);
  }
};
